package com.amrit.collection;

import java.util.Hashtable;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;


public class TestHashTable {
	public Person getPerson(Hashtable<Integer ,Person> h,int key){
		return h.get(key);
	}

	public static void main(String[] args) {
		Hashtable<Integer, Person> h = new Hashtable<Integer ,Person>(10);
		Set<String> s = new TreeSet<String>();
		s.add("MBA");
		s.add("B.tech");
		Person p = new Person("test","test@hibu.com",s);
		h.put(24, p);
		Person p2 = new Person("test", "test@hibu.com", s);
		h.put(null, p2);

		Set<String> s1 = new TreeSet<String>();
		s1.add("MCA");
		s1.add("BCA");
		Person p1 = new Person("Test1","test1@hibu.com",s1);
		h.put(25, p1);

		System.out.println(h.size());
		System.out.println(new TestHashTable().getPerson(h, 24).getCertificate());

		Set ts = new TreeSet();
		ts.add(25);
		ts.add(24);
		Iterator it = ts.iterator();
		while(it.hasNext()){
			System.out.println(it.next());
		}
	}
}
